using QFramework.Example;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace QFramework.Adventure
{

    public class PlayerControllerModel : AbstractModel, IModel
    {
     
        public  BindableProperty<int> CurrentBlood { get; set; } = new BindableProperty<int>();
        public BindableProperty<int> MaxBlood { get; set; } = new BindableProperty<int>();

        public bool isOkSkill;
        public int skillCD=5;

        protected override void OnInit()
        {
            var storage = this.GetUtility<IStorage>();
            //storage.LoadInt(nameof(CurrentBlood), 100)
           CurrentBlood.SetValueWithoutEvent(100);

            CurrentBlood.RegisterWithInitValue(value =>
            {
                UIKit.ShowPanel<PlayerControllerPanel>();
            });
        }
    }
}
